package cn.edu.scau.cmi.yangminghao.FactoryPackage;

import cn.edu.scau.cmi.yangminghao.InsurancePacage.*;

public abstract class BuildingFactory {
	public static final String PICC = "PICC";
	public static final String PingAN = "PINGAN";
	public abstract Com getComs();
	public abstract BodyInjure getBodyInjures();
	public abstract PersonInjure getPersonInjures();
	public abstract Property getPropertys();
	public static BuildingFactory getBuildingFactory(String type) {
		BuildingFactory bf = null;
		if(type.equals(BuildingFactory.PICC)) {
			bf = new PICCBuildingFactory();
		}
		else if (type.equals(BuildingFactory.PingAN)) {
			bf = new PINGANBuildingFactory();
		}
		return bf;
	}
}
